﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.Shell.Interop;
using System.Management.Automation;

namespace Evaluant.PS4VS.Renderer
{
    public class Renderer
    {
        private Renderer()
        {
        }

        public static void Render(IVsOutputWindowPane output, ICollection<PSObject> collection)
        {

            if (collection.Count == 0)
                return;
            IDictionary<string, PSPropertyInfo> infos = collection.First().Properties.ToDictionary(prop => prop.Name);
            foreach (PSPropertyInfo info in infos.Values)
            {
                output.OutputString(info.Name);
            }
            //foreach (PSObject obj in collection)
            //{
            //}
        }
    }
}
